<?php
declare(strict_types = 1);
namespace app\common\lib;

class Time
{
    public static function userLoginExpiresTime(int $type = 2): int
    {
        $type = !in_array($type, [1,2]) ? 2 : $type;
        $day = 1;
        if ($type == 1) {
            $day = 7;
        } elseif ($type == 2) {
            $day = 30;
        }
        return $day * 24 * 3600;
    }
}